<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::DecisionForestEvaluator&lt; FeatureType, DataSet, LabelType, ExampleIndex, NodeType &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_decision_forest_evaluator.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classpcl_1_1_decision_forest_evaluator-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::DecisionForestEvaluator&lt; FeatureType, DataSet, LabelType, ExampleIndex, NodeType &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>Utility class for evaluating a decision forests.  
 <a href="classpcl_1_1_decision_forest_evaluator.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="decision__forest__evaluator_8h_source.html">decision_forest_evaluator.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:aa9b6e66be4de7b6e704c2fa3b5d4b9ac"><td class="memItemLeft" align="right" valign="top"><a id="aa9b6e66be4de7b6e704c2fa3b5d4b9ac"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html#aa9b6e66be4de7b6e704c2fa3b5d4b9ac">DecisionForestEvaluator</a> ()</td></tr>
<tr class="memdesc:aa9b6e66be4de7b6e704c2fa3b5d4b9ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:aa9b6e66be4de7b6e704c2fa3b5d4b9ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa705e03c6fa9a580a2a3d04951b10cbf"><td class="memItemLeft" align="right" valign="top"><a id="aa705e03c6fa9a580a2a3d04951b10cbf"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html#aa705e03c6fa9a580a2a3d04951b10cbf">~DecisionForestEvaluator</a> ()</td></tr>
<tr class="memdesc:aa705e03c6fa9a580a2a3d04951b10cbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:aa705e03c6fa9a580a2a3d04951b10cbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9064f1ce865f1630538af9c9749e46b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html#ab9064f1ce865f1630538af9c9749e46b">evaluate</a> (<a class="el" href="classpcl_1_1_decision_forest.html">pcl::DecisionForest</a>&lt; NodeType &gt; &amp;<a class="el" href="classpcl_1_1_decision_forest_evaluator.html">DecisionForestEvaluator</a>, <a class="el" href="classpcl_1_1_feature_handler.html">pcl::FeatureHandler</a>&lt; FeatureType, DataSet, ExampleIndex &gt; &amp;feature_handler, <a class="el" href="classpcl_1_1_stats_estimator.html">pcl::StatsEstimator</a>&lt; LabelType, NodeType, DataSet, ExampleIndex &gt; &amp;stats_estimator, DataSet &amp;data_set, std::vector&lt; ExampleIndex &gt; &amp;examples, std::vector&lt; LabelType &gt; &amp;label_data)</td></tr>
<tr class="memdesc:ab9064f1ce865f1630538af9c9749e46b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates the specified examples using the supplied forest.  <a href="classpcl_1_1_decision_forest_evaluator.html#ab9064f1ce865f1630538af9c9749e46b">更多...</a><br /></td></tr>
<tr class="separator:ab9064f1ce865f1630538af9c9749e46b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44e922200ff62ba699c100cfa5506a24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html#a44e922200ff62ba699c100cfa5506a24">evaluate</a> (<a class="el" href="classpcl_1_1_decision_forest.html">pcl::DecisionForest</a>&lt; NodeType &gt; &amp;<a class="el" href="classpcl_1_1_decision_forest_evaluator.html">DecisionForestEvaluator</a>, <a class="el" href="classpcl_1_1_feature_handler.html">pcl::FeatureHandler</a>&lt; FeatureType, DataSet, ExampleIndex &gt; &amp;feature_handler, <a class="el" href="classpcl_1_1_stats_estimator.html">pcl::StatsEstimator</a>&lt; LabelType, NodeType, DataSet, ExampleIndex &gt; &amp;stats_estimator, DataSet &amp;data_set, ExampleIndex example, std::vector&lt; NodeType &gt; &amp;leaves)</td></tr>
<tr class="memdesc:a44e922200ff62ba699c100cfa5506a24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluates a specific patch using the supplied forest.  <a href="classpcl_1_1_decision_forest_evaluator.html#a44e922200ff62ba699c100cfa5506a24">更多...</a><br /></td></tr>
<tr class="separator:a44e922200ff62ba699c100cfa5506a24"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:ae5ec2e859058029f6269335d1d8319e4"><td class="memItemLeft" align="right" valign="top"><a id="ae5ec2e859058029f6269335d1d8319e4"></a>
<a class="el" href="classpcl_1_1_decision_tree_evaluator.html">DecisionTreeEvaluator</a>&lt; FeatureType, DataSet, LabelType, ExampleIndex, NodeType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html#ae5ec2e859058029f6269335d1d8319e4">tree_evaluator_</a></td></tr>
<tr class="memdesc:ae5ec2e859058029f6269335d1d8319e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Evaluator for decision trees. <br /></td></tr>
<tr class="separator:ae5ec2e859058029f6269335d1d8319e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;class FeatureType, class DataSet, class LabelType, class ExampleIndex, class NodeType&gt;<br />
class pcl::DecisionForestEvaluator&lt; FeatureType, DataSet, LabelType, ExampleIndex, NodeType &gt;</h3>

<p>Utility class for evaluating a decision forests. </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a44e922200ff62ba699c100cfa5506a24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44e922200ff62ba699c100cfa5506a24">&#9670;&nbsp;</a></span>evaluate() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_decision_forest_evaluator.html">pcl::DecisionForestEvaluator</a>&lt; FeatureType, DataSet, LabelType, ExampleIndex, NodeType &gt;::evaluate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classpcl_1_1_decision_forest.html">pcl::DecisionForest</a>&lt; NodeType &gt; &amp;&#160;</td>
          <td class="paramname"><em>DecisionForestEvaluator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpcl_1_1_feature_handler.html">pcl::FeatureHandler</a>&lt; FeatureType, DataSet, ExampleIndex &gt; &amp;&#160;</td>
          <td class="paramname"><em>feature_handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpcl_1_1_stats_estimator.html">pcl::StatsEstimator</a>&lt; LabelType, NodeType, DataSet, ExampleIndex &gt; &amp;&#160;</td>
          <td class="paramname"><em>stats_estimator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DataSet &amp;&#160;</td>
          <td class="paramname"><em>data_set</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ExampleIndex&#160;</td>
          <td class="paramname"><em>example</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; NodeType &gt; &amp;&#160;</td>
          <td class="paramname"><em>leaves</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Evaluates a specific patch using the supplied forest. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html" title="Utility class for evaluating a decision forests.">DecisionForestEvaluator</a></td><td>The decision forest. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">feature_handler</td><td>The feature handler used to train the tree. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stats_estimator</td><td>The statistics estimation instance used while training the tree. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_set</td><td>The data set used for evaluation. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">example</td><td>The examples that have to be evaluated. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">leaves</td><td>The leaves where the patch arrives </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;{</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  leaves.resize (forest.size ());</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> forest_index = 0; forest_index &lt; forest.size (); ++forest_index)</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    NodeType leave;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <a class="code" href="classpcl_1_1_decision_forest_evaluator.html#ae5ec2e859058029f6269335d1d8319e4">tree_evaluator_</a>.evaluate (forest[forest_index], feature_handler, stats_estimator, data_set, example, leave);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    leaves[forest_index] = leave;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_decision_forest_evaluator_html_ae5ec2e859058029f6269335d1d8319e4"><div class="ttname"><a href="classpcl_1_1_decision_forest_evaluator.html#ae5ec2e859058029f6269335d1d8319e4">pcl::DecisionForestEvaluator::tree_evaluator_</a></div><div class="ttdeci">DecisionTreeEvaluator&lt; FeatureType, DataSet, LabelType, ExampleIndex, NodeType &gt; tree_evaluator_</div><div class="ttdoc">Evaluator for decision trees.</div><div class="ttdef"><b>Definition:</b> decision_forest_evaluator.h:103</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ab9064f1ce865f1630538af9c9749e46b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9064f1ce865f1630538af9c9749e46b">&#9670;&nbsp;</a></span>evaluate() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_decision_forest_evaluator.html">pcl::DecisionForestEvaluator</a>&lt; FeatureType, DataSet, LabelType, ExampleIndex, NodeType &gt;::evaluate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classpcl_1_1_decision_forest.html">pcl::DecisionForest</a>&lt; NodeType &gt; &amp;&#160;</td>
          <td class="paramname"><em>DecisionForestEvaluator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpcl_1_1_feature_handler.html">pcl::FeatureHandler</a>&lt; FeatureType, DataSet, ExampleIndex &gt; &amp;&#160;</td>
          <td class="paramname"><em>feature_handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpcl_1_1_stats_estimator.html">pcl::StatsEstimator</a>&lt; LabelType, NodeType, DataSet, ExampleIndex &gt; &amp;&#160;</td>
          <td class="paramname"><em>stats_estimator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DataSet &amp;&#160;</td>
          <td class="paramname"><em>data_set</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; ExampleIndex &gt; &amp;&#160;</td>
          <td class="paramname"><em>examples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; LabelType &gt; &amp;&#160;</td>
          <td class="paramname"><em>label_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Evaluates the specified examples using the supplied forest. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html" title="Utility class for evaluating a decision forests.">DecisionForestEvaluator</a></td><td>The decision forest. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">feature_handler</td><td>The feature handler used to train the tree. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stats_estimator</td><td>The statistics estimation instance used while training the tree. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_set</td><td>The data set used for evaluation. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">examples</td><td>The examples that have to be evaluated. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">label_data</td><td>The destination for the resulting label data. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;{</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">size_t</span> num_of_examples = examples.size ();</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  label_data.resize (num_of_examples, 0);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> forest_index = 0; forest_index &lt; forest.size (); ++forest_index)</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <a class="code" href="classpcl_1_1_decision_forest_evaluator.html#ae5ec2e859058029f6269335d1d8319e4">tree_evaluator_</a>.evaluateAndAdd (forest[forest_index], feature_handler, stats_estimator, data_set, examples, label_data);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">float</span> inv_num_of_trees = 1.0f / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (forest.size ());</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> label_index = 0; label_index &lt; label_data.size (); ++label_index)</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  {</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    label_data[label_index] *= inv_num_of_trees;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>ml/include/pcl/ml/dt/<a class="el" href="decision__forest__evaluator_8h_source.html">decision_forest_evaluator.h</a></li>
<li>ml/include/pcl/ml/impl/dt/<a class="el" href="decision__forest__evaluator_8hpp_source.html">decision_forest_evaluator.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_decision_forest_evaluator.html">DecisionForestEvaluator</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
